from collections import Counter
#          计数器
from collections import deque
#         双向链表
from collections import namedtuple



d = deque()
d.append(1)
d.append(2)
d.append(3)
print(d)
d.appendleft(4)
print(d)
print(type(d))
d.pop()
print(d)
d.popleft()
print(d)


Point = namedtuple('Point',['long','width'])
#                    Rect   矩形的长，宽
# print(type(Point))
p = Point(1,2)
print(type(p))
print(p.long)
print(p.width)



# # c = Counter('Dancyancy')
# # print(c)
# #  字符串中字符的出现次数
#
# c = Counter({'red':4,'blue':5})
# print(c)
# #   Counter({'blue': 5, 'red': 4})
#
# c2 = Counter(['SE',12,12])
# print(c2)
# #    Counter({12: 2, 'SE': 1})
#
# c3 = Counter(['SE',12,12,'se',1])
# print(c3.most_common())
# #   [(12, 2), ('SE', 1), ('se', 1), (1, 1)]
# print(c3.most_common(1))
# #    [(12, 2)]